#ifndef __CAPTURECALLBACK_H__
#define __CAPTURECALLBACK_H__

#include "DeckLinkAPI.h"

#include <iostream>
#include <fstream>

using namespace std;

class CaptureCallback : public IDeckLinkInputCallback
{
public:

	CaptureCallback();
	
	bool once;
	int count;
	fstream outputFile;
	
	int audioOutputFile;
	
	void dPrint(string data);
	
	virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *ppv) { return E_NOINTERFACE; }
	virtual ULONG STDMETHODCALLTYPE AddRef(void);
	virtual ULONG STDMETHODCALLTYPE  Release(void);
	virtual HRESULT STDMETHODCALLTYPE VideoInputFormatChanged(BMDVideoInputFormatChangedEvents, IDeckLinkDisplayMode*, BMDDetectedVideoInputFormatFlags);
	
	virtual HRESULT STDMETHODCALLTYPE VideoInputFrameArrived(IDeckLinkVideoInputFrame*, IDeckLinkAudioInputPacket*);

};

#endif